SetLeftBorder
Specifies the border which will be displayed at the left side of the page around the specified paragraph.
Syntax
expression.SetLeftBorder(sType, nSize, nSpace, r, g, b);
expression
- A variable that represents a ApiParagraph class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sType | Required | BorderType | The border style. | |
nSize | Required | pt_8 | The width of the current left border measured in eighths of a point. | |
nSpace | Required | pt | The spacing offset to the left of the paragraph measured in points used to place this border. | |
r | Required | byte | Red color component value. | |
g | Required | byte | Green color component value. | |
b | Required | byte | Blue color component value. |
Returns
This method doesn't return any data.
Example
This example specifies the border which will be displayed at the left side of the page around the specified paragraph.
let doc = Api.GetDocument();
let myStyle = doc.CreateStyle("My document style");
let paraPr = myStyle.GetParaPr();
paraPr.SetLeftBorder("single", 24, 0, 255, 111, 61);
let paragraph = doc.GetElement(0);
paragraph.SetStyle(myStyle);
paragraph.AddText("This is the first paragraph. ");
paragraph.AddText("The paragraph properties styled above set a border at its left side.");